package DailyPractice.Day15;

import java.util.Scanner;

/**
 * @author lumin
 * @date 2022/05/11 10:14
 **/
public class Num1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int count = 0;
            int num = sc.nextInt();
            for (int i = 0; i < 32; i++) {
                if((num & (1 << i)) != 0){
                    count++;
                }
            }
            System.out.println(count);
        }
    }
}